package homework4.until;

import homework4.Bean.Book;

import java.util.Comparator;

/**
 * @author CoderXshuai
 */
public class CusComparator implements Comparator<Book> {
    // 决定两个元素大小的方法
    @Override
    public int compare(Book element1, Book element2) {
        return element2.getPressdate().compareTo(element1.getPressdate());

    }


}
